home *** CD-ROM | disk | FTP | other *** search
/ Educational Software Cooperative 4 / Educational Software Cooperative 4.iso / midilang / arpeg.mpl next >
Text File  |  1996-02-06  |  2KB  |  119 lines

  1. 16040
  2. #
  3. #
  4. #
  5. #    Arpeg.mpl
  6. #
  7. #    An aperggiator of any chord played 
  8. #           Author           ID               Date
  9. #       ------------    -----------          ---------
  10. #       Serge Sibony    100417,2633          12/12/95
  11. #      
  12. #
  13. # This file is a mpl effect definition used by MidiLang
  14. #    MidiLang can be found at the MidiForum, in the
  15. #         Windows sound media library.
  16. #
  17. #
  18. # This effect will split any chord played
  19. #
  20. #
  21.  
  22.  
  23.  
  24. Label Main
  25.  
  26. # The channel to be used is the channel 4
  27. # if the midiin in coming from any other channel
  28. # forget it 
  29.  
  30. CHAN!= 4
  31. GOTO END
  32.  
  33. #
  34. # forget any note off
  35. #
  36.  
  37. VEL== 0
  38. GOTO END
  39.  
  40. #
  41. # at the first run, memorize the current time
  42. #
  43.  
  44. V== 1 0
  45. GOTO FIRST
  46.  
  47. #
  48. # if current time - start time < beat (480), this note belongs to the chord
  49. #
  50.  
  51. V=TIME 2
  52.  
  53. V-=V 2 1
  54.  
  55. V> 2 480
  56. GOTO OUT
  57. #
  58. # out : this label is used at the start of a new chord
  59. #
  60.  
  61. V=TIME 1
  62.  
  63. V+= 3 1
  64. V=V 4 3
  65. V*= 4 120
  66. V-= 4 2
  67.  
  68. #
  69. # new note to be played
  70. # the delta time between two notes is 1/4 beats (120) 
  71. #
  72.  
  73. TIME+=V 4
  74.  
  75. OUTMIDI
  76.  
  77. #
  78. # do not forget to stop your note
  79. #
  80.  
  81. TIME+= 120
  82. VEL= 0
  83. OUTMIDI
  84.  
  85. GOTO END
  86.  
  87. LABEL FIRST
  88. V=TIME 1
  89. GOTO END
  90.  
  91. LABEL OUT
  92. OUTMIDI
  93. TIME+= 120
  94. VEL= 0
  95. OUTMIDI
  96.  
  97. #
  98. # new chord
  99. #
  100. V= 3 0
  101. V=TIME 1
  102.  
  103. END
  104.  
  105.  
  106.  
  107. LABEL END
  108. END
  109.  
  110. descript arpeggiator ( from Noel Cosgrave )
  111. descript An arpeggiator takes a chord and splits it into
  112. descript it's constituent notes which are then played serially
  113. descript (only one at a time) rather than as a chord
  114. descript ( it works only on channel 4 )
  115. descript  draft version
  116.  
  117.